Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticketing support #279

Merged
merged 13 commits into from Mar 6, 2014
Merged

Ticketing support #279

merged 13 commits into from Mar 6, 2014

Conversation

anasouma
Copy link
Contributor

No description provided.

List tickets

Options:
--status=open or closed Display only opened or closed tickets, otherwise display both

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's different docopt syntax that can be used here to better indicate the possible options. Have you tried this?

--status=open|closed

@beittenc
Copy link

Looks like you also need to add some unit tests for the new manager. I'd also encourage you to try some integration and functional tests for the CLI if you've got the time. Otherwise, I'm really liking what I see here and most of my notes are more stylistic than anything else.

@anasouma
Copy link
Contributor Author

Hey Nathan, thanks for your comments, I will try to work on them today or tomorrow.
Wissam

@anasouma
Copy link
Contributor Author

anasouma commented Mar 6, 2014

Sorry it took a while, this should be fine now. I need to figure out how to take care of those pep8 issues on my local machine.

if ticket['assignedUser']:
t.add_row([
ticket['id'],
ticket['assignedUser']['firstName'] +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String concatenation isn't typically preferred in Python for the sake of readability. Usually you would do something like this in Python:

"%s %s" % (ticket['assignedUser']['firstName'],
           ticket['assignedUser']['lastName'])

'assignedUserId': currentUser['id'],
'title': title,
}
# if (hardware is None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this commented out code be cleaned up? :)

@anasouma
Copy link
Contributor Author

anasouma commented Mar 6, 2014

Thanks for all your comments, you can tell im new to this. Will get those fixed soon.

@anasouma
Copy link
Contributor Author

anasouma commented Mar 6, 2014

I "believe" I captured all your comments.

wissam


Required:
--title=TITLE The title of the ticket
--subject=xxx The id of the subject to use for the ticket,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, tags are all capitalized and describe what's required. For this case I think ID fits.

usage: sl ticket create --title=TITLE --subject=ID [options]

and

--subject=ID   The id of the subject to use for the ticket,

@sudorandom
Copy link
Contributor

@anasouma this is looking really great. After addressing my last round of comments I think it'll be good to pull.


:param string title: title for the new ticket
:param string body: body for the new ticket
:param string hardware: id of the hardware to be assigned to the ticket
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should match the parameter list. It's subject, and I'm guessing this could apply to CCI or hardware? I'm unsure.

@anasouma
Copy link
Contributor Author

anasouma commented Mar 6, 2014

Thanks for your comments, I made all the changes you requested.

@sudorandom
Copy link
Contributor

LGTM, +1; one more person (@beittenc or @jasonjohnson)? will need to +1 this before merging according to the process we have.

@briancline
Copy link
Member

+1, looks good to me as well. Thanks for all the work on this module.

briancline added a commit that referenced this pull request Mar 6, 2014
@briancline briancline merged commit d8e4d7d into softlayer:master Mar 6, 2014
@anasouma anasouma deleted the TicketingSupport branch March 27, 2014 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants